<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<title>${title}</title>
<link rel="stylesheet" href="${base}/css/default.css" type="text/css">
</head>
<body>
<header><a href="javascript:history.go(-1)" class="back"><span>返回</span></a><h2>推送设置</h2></header>
<nav>
  <ul>
    <li class="n1"><a href="${base}/index/index"><cite></cite><span>首页</span></a></li>
    <li class="n2"><a href="${base}/search/index"><cite></cite><span>搜索</span></a></li>
    <li class="n3"><a href="${base}/subscribe/index"><cite></cite><span>订阅</span></a></li>
    <li class="n4"><a href="${base}/center/index" class="on"><cite></cite><span>我的</span></a></li>
  </ul>
</nav>
<div class="main uc-ps">
    <div class="uh-menu">
    	<ul>
            <li class="<#if ispush=='1'>sc</#if>"><a  title=""><span value="1">开启推送</span></a><i></i></li>
            <li class="<#if ispush=='0'>sc</#if>"><a  title=""><span value="0">关闭推送</span></a><i></i></li>
        </ul>
        <div class="btn"><a title="" class="btn-o">确 定</a></div>
    </div>
</div>
</body>
<script type="text/javascript" src="${base}/js/public/lib/zepto.min.js"></script>

<script type="text/javascript">
(function(w){
	$('.uh-menu li').on('click',function(){
		$(".uh-menu li").removeClass('sc');
		$(this).addClass('sc');
		
		
	});
	$('.btn-o').on('click',function(){
		var value = $('.sc').find('span').attr('value');
		$.ajax({
			'url':'${base}/center/pushSave',
			'type':'post',
			'data':{status:value},
			'dataType':'json',
			success:function(data){
				alert(data.msg)
			}
		})
	});
}(window));
</script>
</html>
